From 4c8ad844ea85560c37a18acd9b0bb18c896c9db7 Mon Sep 17 00:00:00 2001 From: parkrrrr Date: Thu, 11 Aug 2005 19:25:53 +0000 Subject: [PATCH] Fixed (new) segfault. --- gpsbabel/xmltag.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gpsbabel/xmltag.c b/gpsbabel/xmltag.c index e044c3a68..992ec4871 100644 --- a/gpsbabel/xmltag.c +++ b/gpsbabel/xmltag.c @@ -63,6 +63,11 @@ void copy_xml_tag( xml_tag **copy, xml_tag *src, xml_tag *parent ) { char **ap = NULL; char **ap2 = NULL; int count = 0; + + if ( !src ) { + *copy = NULL; + return; + } res = xcalloc( 1, sizeof(xml_tag)); *copy = res; -- 2.30.2